import Layout from '@/layout/index.vue'
import { RouteRecordRaw } from 'vue-router'

const moduleRoutes: RouteRecordRaw[] = [
	// 模块管理
	{
		path: '/module',
		component: Layout,
		redirect: '/module/category',
		meta: { title: '模块管理', icon: 'Tools', index: 3 },
		children: [
			// 分类管理
			{
				path: '/module/category',
				name: 'category',
				component: () => import('@/views/module/category/index.vue'),
				meta: { title: '分类管理' }
			},
			// 商品管理
			{
				path: '/module/goods',
				name: 'goods',
				component: () => import('@/views/module/goods/index.vue'),
				meta: { title: '商品管理' }
			},
			// 会员管理
			{
				path: '/module/guest',
				name: 'guest',
				component: () => import('@/views/module/guest/index.vue'),
				meta: { title: '会员管理' }
			},
			// 订单管理
			{
				path: '/module/order',
				name: 'order',
				component: () => import('@/views/module/order/index.vue'),
				meta: { title: '订单管理' }
			}
		]
	}
]

export default moduleRoutes
